import request2 from '@/utils/request2'
import { contractApiUrl, organizationApiUrl } from '../../config'
import request from '@/utils/request'


export default {
    // 其他合同-审批意见-新增
    addOpinion(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/addOpinion', method: 'post', params, data
        })
    },
    // 其他合同-基本信息-新增
    createByMain(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/createByMain', method: 'post', params, data
        })
    },
    // 其他合同-基本信息-删除
    deleteBymain(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/deleteBymain', method: 'post', params, data
        })
    },
    //
    // 其他合同-基本信息-编辑
    editByMain(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/editByMain', method: 'post', params, data
        })
    },
    // 其他合同-用印-编辑
    editSeal(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/editSeal', method: 'post', params, data
        })
    },
    // 其他合同-分页查询
    findListByMain(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/findListByMain', method: 'get', params, data
        })
    },
    // 其他合同-基本信息-详情
    findListByMainId(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/findListByMainId/' + params.id, method: 'get', params: {}, data
        })
    },
    // 其他合同-审批-基本信息-详情
    findByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/findByBusinessId/' + params.id, method: 'get', params: {}, data
        })
    },
    // 其他合同-用印-详情
    findSealByBaseId(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/findSealByBaseId/' + params.id, method: 'get', params: {}, data
        })
    },
    // 其他合同-审批-用印-详情
    findSealByBusinessId(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/findSealByBusinessId/' + params.id, method: 'get', params: {}, data
        })
    },
    // 提交审批
    generalSubmit(data, params) {
        return request2({
            url: contractApiUrl + '/other-contract/generalSubmit', method: 'POST', params, data
        })
    },

    /**
     *
     登录人岗位查询
     */
    queryCurrentUserPost(data, params) {
        return request2({
            url: contractApiUrl + '/employees/queryCurrentUserPost', method: 'get', params, data
        })
    },

    // 附件列表
    findFileList(data, params) {
        return contractApiUrl + '/other-contract/findFileList'
    },
    // 删除附件
    deleteFile(data, params) {
        return contractApiUrl + '/other-contract/deleteFile'
    },
    // 添加附件
    addFile(data, params) {
        return contractApiUrl + '/other-contract/addFile'
    }
}
